﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using MineDiscover.Interfaces;

namespace MineDiscover
{
    public class MapPainterBackup : TableLayoutPanel
    {
        Graphics gp;

        public MapPainterBackup() : base() { }

        public MapPainterBackup(MapMine map)
            : base()
        {
            Dock = DockStyle.Fill;
            CellBorderStyle = TableLayoutPanelCellBorderStyle.Inset;
            BackColor = Color.Black;
            gp = CreateGraphics();
            
            PaintMap();
        }

        // Size of Square
        private Size sizeSquare = new Size(10, 10);

        public void PaintMap()
        {
            int width = GameMineDiscover.GetInstance().Difficulty.Columns;
            int height = GameMineDiscover.GetInstance().Difficulty.Rows;

            float widthCell = (float)(100.0 / (float)width);
            float Height = (float)(100.0 / (float)width);

            for (int i = 0; i < width; i++)
            {
                for (int j = 0; j < height; j++)
                {
                    ITileStyle buttonTileStype = new TileImage();
                    this.Controls.Add(buttonTileStype as TileImage, j, i);
                }
            }


        }
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
        }
    }
}
